package p270jp.pxv.android.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import androidx.databinding.DataBindingUtil;
import p018ai.C0218e;
import p270jp.pxv.android.R;
import p314lg.ViewMenuItemBinding;

/* renamed from: jp.pxv.android.view.MenuItemView */
/* loaded from: classes2.dex */
public class MenuItemView extends RelativeLayout {

    /* renamed from: a */
    public ViewMenuItemBinding f19562a = (ViewMenuItemBinding) DataBindingUtil.m11370c(LayoutInflater.from(getContext()), R.layout.view_menu_item, this, true);

    public MenuItemView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, 0);
        setGravity(17);
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C0218e.f746d);
        Drawable drawable = obtainStyledAttributes.getDrawable(1);
        String string = obtainStyledAttributes.getString(2);
        boolean z = obtainStyledAttributes.getBoolean(0, false);
        obtainStyledAttributes.recycle();
        this.f19562a.f21407q.setImageDrawable(drawable);
        this.f19562a.f21408r.setText(string);
        m4485a(z);
    }

    /* renamed from: a */
    public void m4485a(boolean z) {
        float f = z ? 1.0f : 0.6f;
        this.f19562a.f21407q.setAlpha(f);
        this.f19562a.f21408r.setAlpha(f);
        setClickable(!z);
    }
}
